Method for defining signal templates in implantable cardiac devices

ABSTRACT

Template formation methods for use in implantable cardiac rhythm management devices. In an illustrative method, a signal is captured signal an implanted cardiac rhythm management device, and parameters for analysis of the captured signal are then defined. Then, in the example, additional signals can be captured and used to either verify or discard the captured signal defined parameters. The template formation methods provide for creating a robust template to compare with sensed cardiac complexes. Devices and systems configured to perform template formation and verification methods are also shown.

RELATED APPLICATIONS

The present invention is related to U.S. patent application Ser. No.10/999,274, filed Nov. 29, 2004, entitled METHOD AND APPARATUS FOR BEATALIGNMENT AND COMPARISON, the disclosure of which is incorporated hereinby reference.

FIELD

The present invention relates generally to implantable cardiac systemsthat detect, sense and classify cardiac signals. More particularly, thepresent invention relates to implantable medical devices that generate atemplate from which the medical device can make comparisons to apatient's normal cardiac complex.

BACKGROUND

Implantable cardiac rhythm management devices are an effective treatmentin managing irregular cardiac rhythms in particular patients.Implantable cardiac rhythm management devices are capable of recognizingand treating arrhythmias with a variety of therapies. To effectivelydeliver these therapies, however, cardiac rhythm management devices mustfirst accurately sense and classify an episode.

In order to apply the proper therapy in responding to an episode, somecardiac rhythm management devices compare sensed cardiac signals to apreviously stored “template” representing normal sinus rhythm (NSR) orother “template” frequently intended to represent the patient's NSR.This stored NSR template must accurately characterize a patient's trueNSR in order to be used in a process that properly identifiespotentially fatal deviations from normal cardiac activity.

Problems arise when the cardiac rhythm management device inaccuratelycompares a sensed cardiac complex to a stored NSR template, and as aresult, misclassifies the sensed cardiac complex. The severity of thisproblem escalates if the cardiac rhythm management deviceinappropriately delivers therapy due to the misclassification. Inillustration, when a particular group of sensed complexes areerroneously compared to a stored template because of an improperalignment to the template, a cardiac rhythm management device maymistakenly classify these sensed complexes as a mismatch and evenpossibly as a tachyarrhythmia.

For the reasons stated above, and for other reasons stated below, whichwill become apparent to those skilled in the art upon reading andunderstanding the present specification, there is a need in the art forproviding a reliable system to generate templates for comparison withsensed cardiac events to accurately classify and, if indicated, treatthe cardiac rhythm a patient is experiencing.

SUMMARY

The present invention is directed toward template formation methods foruse in cardiac rhythm management devices. The template formation methodsof the present invention provide for creating a robust template tocompare with sensed cardiac complexes. In an illustrative embodiment,the present invention is used to form templates having a template dataset and template alignment parameters for use in aligning capturedsignals with the template data set prior to comparing the template dataset to captured signals.

An illustrative embodiment includes a method of cardiac signal analysiscomprising sensing a first cardiac event, configuring templateparameters for analysis of the first cardiac event, defining a firstsensed signal for the first cardiac event using the template parameters,sensing a second cardiac event, defining a second sensed signal for thesecond cardiac event using the template parameters, and comparing thesecond sensed signal to the first sensed signal to determine whether thefirst sensed signal and template parameters are suitable for defining acardiac event template. In another embodiment, the illustrative methodis performed such that the step of configuring template parametersincludes selecting a rule for identifying a fiducial point, wherein therule is selected from among a set of rules, the rule is selected inlight of the characteristics of the first cardiac event, and the rulefor identifying a fiducial point becomes one of the template parameters.In a further embodiment, the step of configuring template parametersfurther includes selecting a number of samples of the first sensedsignal around the fiducial point, wherein the configuration of samplesaround the fiducial point becomes one of the template parameters. Thestep of selecting a number of samples may include identifying the startand end of a cardiac event. For some embodiments, the set of rulesincludes an amplitude rule related to the relative amplitudes of peaksin the sensed signal, and a location rule related to the location of apeak in the sensed signal.

Another illustrative embodiment includes a method of cardiac signalanalysis including forming a template for cardiac event comparisons, thestep of forming a template comprising sensing a first cardiac event,identifying a first fiducial point in the first cardiac event using aset of rules, sensing a second cardiac event, identifying a secondfiducial point in the second cardiac event using the set of rules,determining whether the first fiducial point and second fiducial pointwere identified using the same rule, and, if not, discarding the firstcardiac event.

In yet another embodiment, a method of cardiac signal analysis comprisessampling a signal using electrodes implanted in a patient's torso forcapturing cardiac signals, defining a first sensing window around afirst fiducial point to capture a QRS segment, observing the definitionof the first sensing window to create template parameters, defining asecond sensing window around a second fiducial point using the templateparameters, and comparing data in the first sensing window to data inthe second sensing window to verify whether to define a valid templateusing the template parameters.

Another embodiment includes a method of cardiac signal templateformation comprising receiving a first cardiac signal from implantedelectrodes, selecting a fiducial point in the first cardiac signal,forming a template around the fiducial point, and verifying the templateby receiving a second cardiac signal and using the template to comparethe second cardiac signal to the first cardiac signal.

BRIEF DESCRIPTION OF THE DRAWINGS

FIGS. 1A–1B illustrate, respectively, representative subcutaneous andintravenous implantable cardiac treatment systems;

FIG. 2 depicts a template formation system in accordance with anillustrative embodiment of the present invention;

FIG. 3 shows selection of a positive peak of a cardiac complex based onan amplitude rule of a fiducial point selection process;

FIG. 4 shows selection of a negative peak of a cardiac complex based onan amplitude rule of a fiducial point selection process;

FIG. 5 shows selection of a positive peak of a cardiac complex based ona location rule of a fiducial point selection process;

FIG. 6 shows selection of a negative peak of a cardiac complex based ona location rule of a fiducial point selection process;

FIG. 7 depicts a cardiac signal possessing a notch in the QRS segment;

FIG. 8 shows a pre-template template window;

FIG. 9 shows the pre-template template window depicted in FIG. 8 afterthe monotonic segments are identified in the cardiac complex;

FIG. 10 depicts a cardiac signal having a notch within the cardiacsignal's QRS segment;

FIG. 11 depicts the template window for a patient having a wide QRS;

FIG. 12 shows a cardiac complex having a QRS segment that is capable ofhaving its pre-template template window narrowed by masking;

FIG. 13 depicts the observed template window after adjusting thetemplate window's bounds;

FIG. 14 shows a cardiac complex having a QRS segment width that issmaller than the acceptable minimum template window;

FIG. 15 illustrates a QRS segment that was not properly captured throughthe pre-template template window formation process;

FIG. 16 shows the result of an offset adjustment process to the QRSsegment captured in FIG. 15;

FIG. 17 illustrates a template verification process;

FIGS. 18A–18C further illustrate a template verification step; and

FIG. 19 is a block diagram for an illustrative template formationprocess.

DETAILED DESCRIPTION OF THE DRAWINGS

The following detailed description should be read with reference to thedrawings, in which like elements in different drawings are numberedidentically. The drawings, which are not necessarily to scale, depictselected embodiments and are not intended to limit the scope of theinvention. Those skilled in the art will recognize that many of theexamples provided have suitable alternatives that may be utilized.

The present invention is generally related to implantable cardiactreatment systems that provide therapy for patients who are experiencingparticular arrhythmias. The present invention is directed towarddetection architectures for use in cardiac rhythm devices. Inparticular, the present invention is suited for implantable cardiactreatment systems capable of detecting and treating harmful arrhythmias.Although the detection architecture is intended primarily for use in animplantable medical device that provides defibrillation therapy, theinvention is also applicable to cardiac rhythm devices (includingexternal devices) directed toward anti-tachyarrhythmia pacing (ATP)therapy, pacing or other cardiac stimulation techniques, and othercardiac rhythm devices capable of performing a combination of therapiesto treat rhythm disorders.

To date, implantable cardiac treatment systems have been eitherepicardial systems or transvenous systems. For example, transvenoussystems can be implanted generally as shown in FIG. 1B. However, asfurther explained herein, the present invention is also adapted tofunction with a subcutaneous implantable cardiac treatment system asshown in FIG. 1A.

FIG. 1A illustrates a subcutaneously placed implantable cardiactreatment system, in particular, an implantablecardioverter/defibrillator (ICD) system. In this illustrativeembodiment, the heart 10 is monitored using a canister 12 coupled to alead system 14. The canister 12 may include an electrode 16 thereon,while the lead system 14 connects to sensing electrodes 18, 20, and acoil electrode 22 that may serve as a shock or stimulus deliveryelectrode as well as a sensing electrode. The various electrodes definea number of sensing vectors V1, V2, V3, V4. It can be seen that eachvector provides a different vector “view” of the heart's 10 electricalactivity. The system may be implanted subcutaneously as illustrated, forexample, in U.S. Pat. Nos. 6,647,292 and 6,721,597, the disclosures ofwhich are both incorporated herein by reference. By subcutaneousplacement, it is meant that electrode placement does not requireinsertion of an electrode into a heart chamber, in or on the heartmuscle, or the patient's vasculature.

FIG. 1B illustrates a transvenous ICD system. The heart 30 is monitoredand treated by a system including a canister 32 coupled to a lead system34 including atrial electrodes 36 and ventricular electrodes 38. Anumber of configurations for the electrodes may be used, includingplacement within the heart, adherence to the heart, or dispositionwithin the patient's vasculature.

FIG. 2 depicts a template formation system 40 in accordance with anillustrative embodiment of the present invention. The template formationsystem 40 can be used to create and store multiple static and/or dynamictemplates. Static templates are cardiac complexes that are capturedpreviously in time and stored for reference by the device.Alternatively, dynamic templates are cardiac complexes that arecontinuously or periodically captured and/or updated.

The template formation system 40 of the present invention generallycomprises a multi-stage data analysis—signal collection 42, fiducialpoint selection 44, pre-template formation 46, template optimization 48,and template verification 50. Sections of the multi-stage data analysis,however, may operate autonomously, as will be discussed in detail below.As such, a particular process in the template formation system 40 may bebypassed or may function independently in the device's overall detectionarchitecture.

The system, in an illustrative embodiment, not only identifies NSRsignals for comparison to sensed events, it also defines and re-definesthe sensing parameters (for example, fiducial point selection, windowsize, and/or window/fiducial point alignment). These signals andparameters can then be used for making comparisons with a sensed cardiacsignal to determine whether the signal is NSR.

The processes within the template formation system 40 may additionallycreate or modify a template to accommodate for morphological changes inthe patient's cardiac complex. For example, the ultimately formedtemplate may be continually updated to adapt to certain morphologicalchanges in the sensed cardiac complex. As such, the template formationsystem 40 of the present invention is adaptive and this adaptivecharacteristic may be automated.

The template formation system 40 is initiated by collecting a cardiacsignal 42. The cardiac signal may be collected using any suitablecapture method. This sensed cardiac complex is then processed for properalignment. A method for repetitive and reliable alignment of a collectedsignal enhances the accuracy when comparing sensed signals to a storedtemplate. In some embodiments, the step of collecting the cardiac signal42 may include a signal certification process such as that illustratedin co-pending U.S. patent application Ser. No. 10/858,598, filed Jun. 1,2004, now U.S. Pat. No. 7,248,921, and entitled METHOD AND DEVICES FORPERFORMING CARDIAC WAVEFORM APPRAISAL, the disclosure of which isincorporated herein by reference.

In several embodiments of the present invention, a fiducial point foralignment is generally established using a preferred peak of the sensedcardiac complex. The fiducial point may be selected manually for eachpatient, or alternatively, the fiducial point may be selected using arule-based method. In preferred embodiments, the fiducial point isselected by analyzing the repetitive nature of peaks on ‘n’ consecutivecomplexes. In one embodiment of the present invention, the fiducialpoint selection process 44 is based on the results of the most recentlysensed cardiac complex and the three (3) cardiac complexes previous tothe most recently sensed complex. Alternative embodiments may base thefiducial point selection process 44 on the repetitive nature of as manyas 20 consecutive complexes to as few as an ongoing beat to beatdetermination.

A preferred fiducial point selection process 44 implements a set ofrules to choose the most appropriate peak for alignment in a cardiaccomplex. In preferred embodiments, the fiducial point selection process44 is based on an amplitude rule and a location rule. Additionally, dueto the nature of the fiducial point selection process 44 rules, whilethe R-wave will often be chosen since it is frequently associated as themost striking phase deflection observed in a cardiac complex, the R-waveis not necessarily selected as the fiducial point for alignment in anygiven cardiac complex.

The first rule used by the illustrative fiducial point selection process44 is the amplitude rule. This rule sets the fiducial point on the peak(either positive or negative) of the QRS cardiac complex having thegreatest relative amplitude. The amplitude rule is set forth as:

-   -   If the positive peak amplitude >2 times the negative peak        amplitude, then fiducial point selection is on the peak of the        positive phase deflection—“positive amplitude”;    -   If the negative peak amplitude >2 times the positive peak        amplitude, then fiducial point selection is on the peak of the        negative phase deflection—“negative amplitude”;    -   If neither the positive peak nor the negative peak satisfies the        amplitude rule, then the location rule, set forth below,        controls.

The relative amplitudes for the positive and negative peaks are measuredfrom the patient's isoelectric line 52—illustrated in FIG. 3. Theisoelectric line represents a signal lacking significant detected phasedeflection, i.e. a detected signal level that does not indicate cardiacactivity and provides a baseline for signal analysis. The fiducial pointselection process 44 then determines the largest positive and negativephase deflections from the isoelectric line 52. In the present example,the amplitude of the largest positive phase deflection is shown as 54.Similarly, the amplitude of the largest negative phase deflection isshown as 56. The relative amplitudes of both the positive phasedeflection 54 and negative phase deflection 56 are then assessed. If therelative amplitude of the positive phase deflection is greater than twotimes the relative amplitude of the negative phase deflection, thefiducial point selection is suggested to be on the positive amplitudepeak.

In the present example, the fiducial point selection process isestablished by the repetitive nature of four consecutive cardiaccomplexes. Cardiac complexes 58, 60, 62 and 64 each demonstrate apositive peak amplitude greater than two times (2×) its correspondingnegative peak amplitude. After the fourth consecutive cardiac complex64, the fiducial point selection process establishes the positive peakas the fiducial point for alignment based on the amplitude rule. Thetriangles shown in FIG. 3 represent points where the amplitude rule hasbeen met in four consecutive complexes. Additionally, each trianglesignifies an established fiducial point for template alignment.

FIG. 4 shows fiducial point selection of a negative peak based on theamplitude rule. In the present example, the fiducial point selectionprocess is established by the repetitive nature of a sensed cardiaccomplex and the previous three sensed cardiac complexes (fourconsecutive cardiac complexes). Cardiac complexes 68, 70, 72 and 74 eachdemonstrate a negative peak amplitude greater than two times (2×) itscorresponding positive peak amplitude. Specifically, the amplitude ofthe largest negative phase deflection 56 is assessed to be two times therelative amplitudes of the positive phase deflection 54. After thefourth consecutive cardiac complex 74, the fiducial point selectionprocess establishes the negative peak as the fiducial point foralignment based on the amplitude rule. The triangles shown in FIG. 4represents a point where the amplitude rule has been met for fourconsecutive complexes. Additionally, each triangle signifies anestablished fiducial point for template alignment.

The second rule used by the illustrative peak alignment process is thelocation rule. This rule is premised on setting the fiducial point onthe peak of the first significant phase deflection (either positive ornegative) occurring in time within the ventricular cardiac complex. Incertain embodiments, the location rule is considered when the amplituderule cannot be established. Alternate embodiments utilize the locationrule without deference to the amplitude rule. The location rule is setforth as:

-   -   If a significant positive phase deflection precedes a        significant negative phase deflection in a cardiac complex, then        fiducial point selection is on the peak of the positive phase        deflection—“positive location”;    -   If a significant negative phase deflection precedes a        significant positive phase deflection in a cardiac complex, then        fiducial point selection is on the peak of the negative phase        deflection—“negative location”.

FIG. 5 shows an illustrative fiducial point selection of a positive peakbased on the location rule. In the present example, the fiducial pointselection process is established by the repetitive nature of fourconsecutive cardiac complexes. Cardiac complexes 78, 80, 82 and 84 eachshow a significant positive phase deflection before a significantnegative phase deflection in the cardiac complex. After the fourthconsecutive cardiac complex 84, the fiducial point selection processestablishes the peak of the positive phase deflection as the fiducialpoint for alignment based on the location rule. The triangles shown inFIG. 5 represent points where the location rule has been met in fourconsecutive complexes. Additionally, each triangle signifies anestablished fiducial point for template alignment.

FIG. 6 shows an illustrative fiducial point selection of a negative peakbased on the location rule. The fiducial point selection process in FIG.6 is established by the repetitive nature of four consecutive cardiaccomplexes. Cardiac complexes 88, 90, 92 and 94 each show a significantnegative phase deflection before a significant positive phase deflectionin the cardiac complex. After the fourth consecutive cardiac complex 94,the fiducial point selection process establishes the peak of thenegative phase deflection as the fiducial point for alignment based onthe location rule. The triangles shown in FIG. 6 represent a point wherethe location rule has been met for four consecutive complexes.Additionally, each triangle signifies an established fiducial point fortemplate alignment.

In certain embodiments where the fiducial point selection processrequires more than one cardiac complex to establish a fiducial point,the process may require each of the cardiac complexes assessed to adhereto the same rule (amplitude or location) before establishing a fiducialpoint for alignment. More particularly, each cardiac complex analyzedand used for establishing a fiducial point must adhere to the same oneof the four possible rule bases: positive amplitude, negative amplitude,positive location, or negative amplitude.

In alternative embodiments, the fiducial point selection process mayrequire all of the cardiac complexes assessed to establish the samefiducial point (i.e., the same positive peak) regardless of which rulewas used. In an illustrative embodiment, the fiducial point selectionprocess is established by the repetitive nature of three consecutivecardiac complexes. Two of the three cardiac complexes may establish thefiducial point on the positive peak using the positive amplitude rulebase. The remaining cardiac complex may establish the same fiducialpoint on the complex's positive peak, however, using the positivelocation rule and not the amplitude rule. While not using the same rule,all three cardiac complexes indicate the same fiducial point, and assuch, are indicated for submission to template verification, as referredto in FIG. 2.

In certain circumstances, a notch is observed in the cardiac signal'sQRS segment. FIG. 7 depicts a cardiac signal possessing a notch 96 inthe QRS segment. A notch in a cardiac signal normally fails to affectthe fiducial point selection process. This is observed because apredominant peak usually exists amongst the peaks forming the notch.Thus, the fiducial point selection process will generally select thepredominant peak. In instances where one peak does not stand out overthe other peak (as is depicted in FIG. 7), or when the predominant peakfrequently changes from cardiac complex to cardiac complex, a potentialfor confusion in the fiducial point selection process may arise. Inembodiments possessing such problematic notch segments, a notch analysisprocess may be used to assure the proper fiducial point selection foralignment.

In an illustrative notch analysis process, a notch is presumed to existif the distance (in time) between the two peaks 98 is more thanapproximately 20 msec and/or if the difference in peak amplitudes 100 isless than approximately 115 μV. These values may vary in severalembodiments depending upon the placement and design of sensingelectrodes, as well as the expected characteristics of notched QRS peaksfor a given patient. If these conditions are not met, it is presumedthat a predominant peak does exist, that the fiducial point selectionprocess will identify the predominant peak, and so the illustrativenotch analysis process is skipped. However, if these conditions are met,then the cardiac signal is presumed to possess a notch requiring furtheranalysis for proper fiducial point selection.

The illustrative notch analysis process identifies the peaks in thesignal, and determines which peak has been initially identified as thefiducial point. If the first peak occurring in time is identified as thefiducial point, then the notch analysis is complete. If the second peakoccurring in time is identified as the fiducial point, then the notchanalysis process forces the fiducial point onto the first peak of thenotch occurring in time.

Once the fiducial point is selected, the pre-template is then formed.FIG. 8 is an illustrative embodiment of a pre-template 102. Thepre-template 102 is populated with a number of samples taken at asampling frequency which form a pre-template data set. In theillustrative embodiment, the disposition of the pre-template data setwithin the pre-template is determined by template alignment parametersincluding the fiducial point selection explained above and the placementand masking steps further discussed below.

In an illustrative embodiment, the fiducial point 104 is placed at thecenter of the pre-template 102. In preferred embodiments, a number ofsamples ‘n’ are established to the left of the fiducial point 104, and‘n’ samples are also established to the right of the fiducial point 104.For example, some embodiments of the present invention utilize forty-one(41) samples sampled at 256 Hz, corresponding to approximately 160 msec.In an illustrative embodiment, twenty (20) samples are established tothe left of the fiducial point 104 and another twenty (20) samples areestablished to the right of the fiducial point 104. The forty-one (41)samples form a pre-template window 106 in which the relevant portion ofa cardiac signal will be analyzed. In alternative embodiments, thenumber of samples ‘n’ populated on either side of the center of thepre-template 102 may differ.

From this initially formed pre-template window 106, the boundaries ofthe cardiac complex's QRS segment are sought. FIG. 8 shows apre-template window 106 that includes a QRS segment as well asextraneous portions of a sensed cardiac signal. In this instance, it isdesired to optimize the formed pre-template 102 by narrowing thepre-template window 106 to comprise mostly the QRS segment and reduceextraneous portions of the cardiac signal. The first step in thisprocess is to identify the beginning and end of the QRS segment.

In one embodiment of the present invention, the observation of monotonicsegments is used to estimate the beginning and end of the QRS segment. Amonotonic segment is a signal segment of consecutive samples in whichthe sensed amplitude changes in the same direction or stays the same.For example, a series of consecutive samples in which each successivesample is greater than or equal to (in amplitude) the previous samplewould be an increasing monotonic segment. Similarly, a series ofconsecutive samples in which each successive sample is less than orequal to (in amplitude) the previous sample would be a decreasingmonotonic segment. One method for observing monotonic segments is bydetermining the zero crossing points of the first derivative of thecardiac complex signal.

In this embodiment, an arithmetic operation is performed on the initialpre-template 102 to identify the cardiac complex's monotonic segments—asindicated by the zero crossing points of the first derivative of thecardiac complex signal. FIG. 9 shows the pre-template window 106depicted in FIG. 8 after all of the monotonic segments are identified inthe cardiac complex. Each diamond indicates the beginning/end of amonotonic segment. An arithmetic operation then identifies the largestmonotonic segment (in terms of change of amplitude) in the initialpre-template 102 before the fiducial point 104. This sample is noted as“QRS begin” 108. The arithmetic operation further identifies the largestmonotonic segment (in terms of change of amplitude) in the initialpre-template 102 after the fiducial point 104. This sample is noted as“QRS end” 110. QRS begin and QRS end estimate the boundaries for thecardiac complex's QRS segment in this embodiment.

The use of monotonic segments is further useful for eliminating errorsin calculating QRS segment length with cardiac complexes having a notchin their QRS segment. FIG. 10 illustrates a cardiac complex possessing anotch. Since the arithmetic operation of the illustrative embodimentidentifies the largest monotonic segment (in amplitude) in the initialpre-template 102 before the fiducial point 104 and after the fiducialpoint 104, most notches will not affect the algorithm's ability to findthe desired QRS begin and QRS end. As depicted in FIG. 10, the relativemonotonic segment amplitudes within the notch are smaller than theamplitudes of the monotonic segments at either end of the QRS segment.Therefore, the notch generally does not affect the estimated measurementof the QRS segment.

Alternative methods known in the art may also be utilized to estimatethe beginning and end of the cardiac complex's QRS segment. The use ofmonotonic segments to estimate the QRS segment is merely illustrative,and various embodiments of present invention are not limited to thisparticular aspect of the illustrative embodiment.

After the QRS segment has been identified, the pre-template 102 is thenoptimized for performance—process 46 in FIG. 2. Optimization includes,but is not limited to, masking the pre-template window 106 to includethe most relevant samples in the cardiac complex, as well as offsetadjustment.

One method for template optimization is to narrow or mask thepre-template window 106 to include only those samples indicative of theQRS segment. In patients with wide QRS segments, optimization by removalof some samples is not indicated. For example, in the above illustrativeembodiment, if a patient has a QRS segment longer than 160 msec (or 41samples), the patient's QRS segment exceeds the initially formedpre-template window 106. Thus, the patient's identified QRS begin 108 isthe first sample within the pre-template window 106 and the identifiedQRS end 110 is the last sample within the pre-template window 106, eventhough the patient's actual QRS segment may extend beyond the confinesof the formed pre-template window 106. An example of a wide QRS segmentthat exceeds the size of the pre-template window 106 is shown in FIG.11. Masking the pre-template window 106 is not indicated in theseinstances.

In contrast, the pre-template window 106 may be masked when the QRSsegment is less than the pre-template's window 106. For example, and asdepicted in FIG. 12, suppose a patient's QRS begin 108 is at the fourthsample within the pre-template window 106. Similarly, suppose thepatient's QRS end 110 occurs on the thirty-fifth sample within thepre-template window 106. Thus, the patient's QRS segment is thirty-two(32) samples long. The other nine (9) samples included in the originalpre-template window 106 are generally not useful for analysis, and mayintroduce undesired effects if included in the final template.Therefore, the bounds of the pre-template 102 may be masked to form amasked pre-template window 114 that only includes the actual QRSsegment—between QRS begin 108 and QRS end 110. In this example, thepre-template window 106 would be masked to the 32 samples representingthe estimated QRS segment. Specifically, the pre-template bounds aremasked so that the masked pretemplate window 114 begins on sample 4 andends on sample 35, thereby eliminating extraneous samples 112 from themasked pre-template window 114. FIG. 13 depicts the observed maskedpre-template window 114 after the masking process. Such narrowing ormasking, while useful in some embodiments, is not required by thepresent invention.

If desired, a minimum duration for the masked pre-template window 114may be defined. In one embodiment of the present invention, the minimummasked pre-template window 114 is approximately 100 msec (25 samples at256 Hz). In patients having narrow QRS segments (less than approximately100 msec), the allowable masked pre-template window 114 may stillinclude some extraneous samples with the QRS segment for these patients.For example, as depicted in FIG. 14, if the QRS begin 108 is on sampletwelve (12) and the QRS end 110 occurs on sample twenty-nine (29), thenthe width of the QRS segment is eighteen (18) samples. This QRS segmentwidth is smaller than the illustrative minimum for the maskedpre-template window 114 of twenty-five (25) samples. To mask the QRSsegment to the minimum boundary allowable, the difference is firstcalculated between the masked pre-template window's minimum (25 samples)and the estimated QRS segment width (eighteen (18) samples in thisexample). This difference is seven (7) samples. The difference is thensplit in half and added equally (or as equally as possible) to bothsides of the estimated QRS segment length. Thus, the optimized maskedpre-template window 114 in this example would include the actual QRSsegment 116 with three (3) additional samples preceding the QRS begin108 and four (4) additional samples following the QRS end 110.

There are other instances where the pre-template window 106 does notinclude the complete QRS segment. An example of such an instance is whenthe sample indicating the QRS begin 108 or QRS end 110 occurs on thefirst or last sample within the initially formed pre-template window106. In some embodiments, this gives rise to an assumption that theactual QRS begin 108 or QRS end 110 is not accurately captured and thatthe actual QRS begin 108 or QRS end 110 occurs sometime outside theboundaries of the initially formed pre-template window 106. An exampleof a pre-template window 106 where the last sample within thepre-template window is also the QRS end 110 is depicted in FIG. 15.

In FIG. 15, a pre-template window 106 is populated with samples 1through 41. The first sample appears near the vertical axis midpoint ofthe template window. In contrast, the last sample (sample 41) appearsnear the bottom of the template window's vertical axis. As the samplesmove along the horizontal axis from sample 1, the samples graduallyincrease in height until reaching the QRS begin 108 for the cardiaccomplex segment. The remainder of the pre-template window 106 containsmost, but not all, of the QRS segment. The remainder of the QRS segmentnot captured within the boundaries of the pre-template window 106 isshown as 116. In such an instance, the entire QRS segment was notproperly captured through the pre-template window 106 formation process.Some embodiments of the present invention resolve this issue through anoffset adjustment.

The offset adjustment process first identifies which side of the QRSsegment was not properly captured. As described above and depicted inFIG. 15, the QRS begin 108 is sample eight (8) and the perceived QRS end111 is sample forty-one (41). This generally indicates that the true QRSend 110 actually occurs at a point later in time and was not capturedusing the initial settings for forming the pre-template window 106. Whenit is indicated that the true QRS end 100 was not properly captured, anumber of samples will precede the QRS begin 108. These leading samplesare called the “residue” 118. In FIG. 15, the residue consists of thefirst seven (7) samples preceding the QRS begin 108. Since the samplesconstituting the residue 118 relay little information regarding the QRSsegment itself, these samples may be discarded and replaced by samplesthat do represent the QRS segment but which were omitted through theinitial pre-template window formation process. The process for shiftingthe pre-template window 106 in one direction is called offset. Theeffect of the offset process, in the present example, is to allow thepre-template window 106 to start ‘n’ number of residue samples later toensure that the true QRS end 110 is captured.

In a preferred embodiment, the sample representing the QRS begin 108plus the immediately preceding sample (QRS begin −1), or the QRS end 110plus the immediately following sample (QRS end +1), along with thesamples therebetween, are retained. The remaining samples comprise theresidue 118. In alternative embodiments, the QRS begin 108 or the QRSend 110, plus some ‘n’ number of samples preceding or following, isretained and the remaining samples comprises the residue 118. In yetalternative embodiments, just the QRS begin 108 or QRS end 110 is keptand the remaining samples are considered residue.

FIG. 16 illustrates the offset process on the cardiac complex depictedin FIG. 15. Specifically, FIG. 16 depicts the formation of an offsetpre-template window 120 to recapture the cardiac complex's true QRS end110. As described above, FIG. 15 shows that there are eight (8) residuesamples 118 leading the QRS begin 108. These residue samples 118 areeliminated and QRS begin 108 is forced to be the first sample in a newlyformed offset pre-template window 120. This adjustment is graphicallydepicted in FIG. 16. Thus, the offset pre-template window 120 starts atthe QRS begin 108 and now ends eight (8) samples later than it initiallydid when the pre-template window 106 was initially formed. The result ofthis shift permits the newly formed offset pre-template window 120 torecapture the cardiac complex's true QRS end 110. Thus, the offsetpre-template window 120 comprises the entire QRS segment including boththe true QRS begin 108 and the true QRS end 110.

In preferred embodiments, after the offset adjustment process, thecorrected template window is further optimized by masking the bounds ofthe offset template—as described above.

The parameters used in defining the optimized pre-template window are,in an illustrative example, described as the template parameters. Thetemplate parameters describe how the template data set is defined andaligned within the template. These parameters, including the manner offiducial point selection, offset (if any) and masking (if any) providetemplate parameters indicating how the template can be used in makingfuture comparisons. The template parameters may be used as described incopending U.S. patent application Ser. No. 10/999,274, filed Nov. 29,2004, entitled METHOD AND APPARATUS FOR BEAT ALIGNMENT AND COMPARISON,which is filed on Nov. 29, 2004 even date herewith, is assigned to theassignee of the present invention; the disclosure of the application isalso incorporated herein by reference. However, in the illustrativeembodiment, prior to using the template (including its associatedtemplate parameters and template data set) for future comparisons tosensed signals, the template data set is verified for validity.

Once the pre-template is optimized by defining its sample windowcharacteristics, including but not limited to masking and offsetadjustment, the data in optimized pre-template is verified for itsvalidity—process 50 in FIG. 2. The verification of optimizedpre-template validity provides a check on both the template parametersand the template data set. In preferred embodiments, validity must beestablished before the optimized pre-template is stored as the finaltemplate, or as one template among several for use in comparing tosubsequently sensed cardiac signals. FIG. 17 illustrates the templateverification process 50 for an optimized pre-template.

The optimized pre-template 130 is initially stored in a buffer. Thedevice then senses a subsequent cardiac complex 132 using the optimizedparameters set for the optimized pre-template 130. Cardiac complex 132is then compared to the stored optimized pre-template 130. In apreferred embodiment, an arithmetic operation similar to correlation isperformed to determine the similarity between 130 and 132. Anillustrative arithmetic operation includes correlation waveformanalysis, which returns a result between −1 and 1, and which can bescaled using a number of linear, non-linear, and hybrid scaling methodsas noted in co-pending U.S. application Ser. No. 10/856,084 filed May27, 2004 and entitled METHOD FOR DISCRIMINATING BETWEEN VENTRICULAR ANDSUPRAVENTRICULAR ARRHYTHMIAS, the disclosure of which is incorporatedherein by reference.

In an illustrative embodiment, a correlation waveform analysis isperformed and then scaled to a percentage value between 0–100%, withnegative correlations given a 0%, and positive scores linearly scaledbetween 0–100%. If the similarity score between the subsequent cardiaccomplex 132 and the optimized pre-template 130 is greater than aspecified threshold, the subsequent cardiac complex 132 is averaged withthe optimized pre-template 130. In certain embodiments of the presentinvention, the threshold for comparison is specified at 80%. Alternativethreshold levels may be set without deviating from the spirit and scopeof the invention. Additionally, in certain embodiments, the cardiaccomplex that is compared to the optimized pre-template 130 is notaveraged after comparison. If the similarity score does not surpass thespecified threshold, then the optimized pre-template 130 is discardedand the entire template formation process is restarted.

In certain embodiments, if the comparison threshold value is exceeded,then the verification process is repeated with another incoming cardiaccomplex, for example cardiac complexes 134, 136 and 138. The devicecaptures the cardiac complex 134 using the parameters set for theaveraged optimized pre-template (130+132) and performs a furthercomparison between the cardiac complex 134 and the averaged optimizedpre-template (130+132). Again, alternative embodiments may compare thenewly sensed cardiac complex 134 to the initially stored optimizedpre-template 130. In the present illustrative example, the comparisonscore between the cardiac complex 134 and the averaged optimizedpre-template (130+132) is 85%. Since this score is greater than thecomparison threshold of 80%, the verification process is continued.

The verification process is repeated at least this one additional timein some embodiments of the present invention. In a preferred embodiment,this process is iterated until four (4) consecutive cardiac complexesexceed the threshold level for comparison with either the initiallystored optimized pre-template 130, or the averaged optimizedpre-template (130+132+134+136). If at any time during the process thesimilarity score does not surpass the specified threshold, then theoptimized pre-template is discarded and the template formation processis restarted in its entirety until a verified template is created.

The template is verified after completing the specified number ofiterations for the verification process. In the present illustrativeembodiment, the comparison scores to the averaged optimized pre-templatefor cardiac complexes 132, 134, 136 and 138 were 85%, 89%, 84% and 84%,respectively. Each of these comparison scores exceeded the comparisonthreshold set for the present example. Thus, the optimized pre-templateis verified and the pre-template is considered the final template,thereby completing the template formation process. The formed templatecan then be used to observe and characterize incoming sensed cardiacsignals.

FIGS. 18A–18C further illustrate a template verification step. As shownin FIG. 18A, a sampled signal is placed into a pre-template templatehaving a fiducial point which is defined using the amplitude rule. Thefiducial point is placed as sample s21, with 20 samples on either sidemaking up the pre-template template window. QRS start and end points areidentified at s10 and s33, respectively. The signal and its parametersare referred to as an optimized pre-template. Next, the signal is maskedusing QRS +/− 1 rules, such that the optimized pre-template is as shownby the box, extending from sample s9 to s34. The optimized pre-templateis then stored until verified.

Turning to FIG. 18B, another sampled signal is captured and theoptimized pre-template parameters from FIG. 18A are used to define thesignal window. In particular, the amplitude rule is used to select afiducial point and place it at sample s21, and the sample is masked toonly include samples s9 to s34. As can be seen, the captured QRS segmentin FIG. 19B is not accurately masked, as the QRS signal ends at s35,outside the signal window, and the QRS start occurs one sample laterthan would be desired. However, the overall shape generally resemblesthat of FIG. 18A, and a correlation of the two signals could becalculated to yield a score above a defined threshold such as 0.8 or 80%correlation. Thus the signal in FIG. 18B could be retained for averagingwith that of FIG. 18A to further characterize the optimizedpre-template. Alternatively, the data may not be averaged and the signalin the optimized pre-template of FIG. 18A used in further analysis. Inanother alternative, the verification provided by the signal in FIG. 18Bcould be defined as sufficient to store that of FIG. 18A as a templatefor comparison.

Turning to FIG. 18C, a third sampled signal is captured for comparisonto the signal in 18A. The first step here is to identify the fiducialpoint. However, it can be seen that there are two positive peaks X and Ywhich are near one another. Neither peak qualifies for the amplituderule, as each has nearly the same amplitude. Therefore the location rulewould have to be used to select the fiducial point. In an illustrativeembodiment, this fact alone would be enough to discard the signal and/ordiscard the template formed using the signal of FIG. 18A, as the samerule sets could not be used to define the fiducial point.

In other embodiments, the sampled signal of FIG. 18C may still be usedfor template verification even though a different fiducial point rule isused. Under such an embodiment, the signal from FIG. 18C may still causerejection of the template formed using the signal shown in FIG. 18A.More particularly the signals in FIG. 18A and FIG. 18C are poorlycorrelated, as it can be seen that the signal to the left of thefiducial point s21 is lower, while the signal to the right of thefiducial point s21 is higher in FIG. 19C than in FIG. 18A. If thecorrelation falls below a defined level, then the template is discarded.In a further embodiment, a beat validation process may be used to assurethat a sensed noisy cardiac event, or simply a noise signal, does notreach the template formation steps, preventing template verification dueto the likely low correlation of such a non-validated signal. Someexample beat validation processes are shown in co-pending U.S. patentapplication Ser. No. 10/858,598, filed Jun. 1, 2004, now U.S. Pat. No.7,248,921, and entitled METHOD AND DEVICES FOR PERFORMING CARDIACWAVEFORM APPRAISAL, the disclosure of which is incorporated herein byreference.

FIG. 19 is a block diagram for an illustrative template formationprocess. The process 200 begins by defining a number of sensingparameters, as shown at 202. The sensing parameters may includesampling, window and fiducial point characteristics. Next, a template isfilled with data using the sensing parameters, as shown at 204. Avalidation step follows, as noted at 206. The validation step 206 mayinclude, for example, comparison to successive samples. If validated,the template and its associated sensing parameters are retained as shownat 208. If the template and its associated sensing parameters cannot bevalidated, then they are discarded as shown at 210.

The present invention, in some embodiments, is also embodied in devicesusing operational circuitry including select electrical componentsprovided within the canister 12 (FIG. 1A) or canister 32 (FIG. 1B). Insuch embodiments, the operational circuitry may be configured to enablethe above methods to be performed. In some similar embodiments, thepresent invention may be embodied in readable instruction sets such as aprogram encoded in machine or controller readable media, wherein thereadable instruction sets are provided to enable the operationalcircuitry to perform the analysis discussed in the above embodiments.Further embodiments may include a controller or microcontroller adaptedto read and execute the above methods. These various embodiments mayincorporate the illustrative methods shown above, for example.

The following illustrative embodiments are explained in terms ofoperational circuitry. The operational circuitry may be configured toinclude such controllers, microcontrollers, logic devices, memory, andthe like, as selected, needed, or desired, for performing the methodsteps of which each is adapted and configured.

The present invention, in an illustrative apparatus embodiment, includesan implantable cardioverter/defibrillator comprising a lead electrodeassembly including a number of electrodes, and a canister housingoperational circuitry. The illustrative apparatus embodiment may beconfigured wherein the lead electrode assembly is coupled to thecanister, and the operational circuitry is configured to perform stepsof discriminating between cardiac rhythms of a patient's heart which areappropriate for therapy, the steps including: sensing a first cardiacevent; configuring template parameters for analysis of the first cardiacevent; defining a first sensed signal for the first cardiac event usingthe template parameters; sensing a second cardiac event; defining asecond sensed signal for the second cardiac event using the templateparameters; and comparing the second sensed signal to the first sensedsignal to determine whether the first sensed signal and templateparameters are suitable for defining a cardiac event template.

The operational circuitry may, in another embodiment, be configured suchthat the step of configuring template parameters includes selecting arule for identifying a fiducial point, and the rule is selected fromamong a set of rules, the rule is selected in light of thecharacteristics of the first cardiac event, and the rule for identifyinga fiducial point becomes one of the template parameters. In yet anotherembodiment, the step of configuring template parameters further includesselecting a number of samples of the first sensed signal around thefiducial point, and the configuration of samples around the fiducialpoint becomes one of the template parameters. In another embodiment, theoperational circuitry is configured such that the step of selecting anumber of samples includes identifying the start and end of a cardiacevent. In on embodiment, the operational circuitry is configured suchthat the cardiac event is a QRS complex. In some embodiments, theoperational circuitry is configured such that the set of rules includesan amplitude rule related to the relative amplitudes of peaks in thesensed signal. The set of rules may include a location rule related tothe location of a peak in the sensed signal. In yet another embodiment,the operational circuitry is configured such that the set of rulesincludes a location rule related to the location of a peak in the sensedsignal.

In yet another embodiment, the operational circuitry is configured suchthat the set of rules includes a notch rule related to identifying anotched cardiac signal, wherein the notch rule includes analysis ofwhether there are multiple peaks within a predefined range of oneanother in the cardiac signal. The operational circuitry may beconfigured such that the notch rule selects the first peak in time ifthere are multiple peaks within the predefined range. In anotherembodiment, the operational circuitry may be configured such that thestep of configuring template parameters further includes selecting anumber of samples of the first sensed signal around a fiducial point inthe first sensed signal; wherein the configuration of samples around thefiducial point becomes one of the template parameters. The operationalcircuitry, in an illustrative embodiment, is configured such thatsamples are selected using the following steps: first, a number ofsamples are observed on either side of the fiducial point; next, it isdetermined whether a desired QRS segment begins and ends within thenumber of samples; and the number of samples on either side of thefiducial point is adjusted to capture the QRS segment and exclude atleast some samples not corresponding to the desired QRS segment. Anotherillustrative embodiment includes one wherein the operational circuitryis configured such that the step of configuring template parametersincludes observing whether a notched QRS complex is likely, and, if so,adjusting the template parameters to assure that a repeatably detectablefiducial point is chosen.

Another embodiment includes an implantable cardioverter/defibrillatorcomprising a lead electrode assembly including a number of electrodesand a canister housing operational circuitry; wherein: the leadelectrode assembly is coupled to the canister; and the operationalcircuitry is configured to perform steps of discriminating betweencardiac rhythms of a patient's heart which are appropriate for therapy.The steps may include sampling a signal using the lead electrodeassembly while implanted in a patient's torso in locations chosen forcapturing cardiac signals; defining a first sensing window around afirst fiducial point to capture a QRS segment; observing the definitionof the first sensing window to create template parameters; defining asecond sensing window around a second fiducial point using the templateparameters; and comparing data in the first sensing window to data inthe second sensing window to verify whether to define a valid templateusing the template parameters. The operational circuitry may beconfigured such that the step of defining a first sensing windowincludes identifying a fiducial point by selecting a rule from among aset of rules in light of the characteristics of the QRS segment in thefirst sensing window, wherein the rule selected for identifying afiducial point becomes one of the template parameters. Further, theoperational circuitry may be configured such that the step defining afirst sensing window around a first fiducial point includes identifyingthe start and end of a cardiac event. If desired, the cardiac event maybe a QRS complex.

In another embodiment, the operational circuitry is configured such thatthe set of rules includes an amplitude rule related to the relativeamplitudes of peaks in the sampled signal, and a location rule relatedto the location of a peak in the sampled signal. In yet anotherembodiment, the operational circuitry is configured such that the stepof defining a first sensing window includes selecting a number ofsamples around a fiducial point, wherein the configuration of samplesaround the fiducial point becomes one of the template parameters. Theoperational circuitry may be configured such that the samples areselected using the following steps: a fiducial point is selected; then anumber of samples are observed on either side of the fiducial point;then it is determined whether a desired QRS segment begins and endswithin the number of samples; and the number of samples on either sideof the fiducial point is adjusted to capture the QRS segment and excludeat least some samples not corresponding to the desired QRS segment.

In yet another embodiment, the operational circuitry is configured suchthat the step of defining a first sensing window includes observingwhether a notched QRS complex is likely, and, if so, adjusting thetemplate parameters to assure that a repeatably detectable fiducialpoint is chosen.

An illustrative embodiment may include an implantablecardioverter/defibrillator comprising a lead electrode assemblyincluding a number of electrodes and a canister housing operationalcircuitry, wherein: the lead electrode assembly is coupled to thecanister; and the operational circuitry is configured to perform stepsof discriminating between cardiac rhythms of a patient's heart which areappropriate for therapy. The steps of discriminating may include forminga template using at least the steps of: sensing a first cardiac event;identifying a first fiducial point in the first cardiac event using aset of rules; sensing a second cardiac event; identifying a secondfiducial point in the second cardiac event using the set of rules;determining whether the first fiducial point and second fiducial pointwere identified using the same rule; and, if not, discarding the firstcardiac event.

Another illustrative embodiment includes an implantablecardioverter/defibrillator comprising a lead electrode assemblyincluding a number of electrodes and a canister housing operationalcircuitry, wherein the lead electrode assembly is coupled to thecanister and the operational circuitry is configured to perform steps ofdiscriminating between cardiac rhythms of a patient's heart which areappropriate for therapy. The discriminating steps may include forming atemplate using at least the steps of receiving a first cardiac signalfrom the lead electrode assembly, selecting a fiducial point in thefirst cardiac signal, forming a template around the fiducial point, andverifying the template by receiving additional cardiac signals and usingthe template to compare the additional cardiac signals to the firstcardiac signal. In another embodiment, the operational circuitry isconfigured such that the step of selecting a fiducial point includesidentifying a fiducial point by selecting a rule from among a set ofrules in light of the characteristics of first cardiac signal, whereinthe rule selected for identifying a fiducial point becomes one of thetemplate parameters. The operational circuitry may be configured suchthat the step forming a template around the fiducial point includesidentifying the start and end of a cardiac event. In another embodiment,the operational circuitry may be configured such that the set of rulesincludes an amplitude rule related to the relative amplitudes of peaksin the cardiac signal. The set of rules may further include a locationrule related to the location of a peak in the cardiac signal. In anotherembodiment, the operational circuitry is configured such that the set ofrules includes a location rule related to the location of a peak in thecardiac signal.

In another embodiment, the operational circuitry is configured such thatthe step of forming a template includes selecting a number of samplesaround the fiducial point, wherein the configuration of samples aroundthe fiducial point becomes one of the template parameters. Theoperational circuitry may be configured such that the samples areselected using the following steps: a number of samples are observed oneither side of the fiducial point; it is determined whether a desiredQRS segment begins and ends within the number of samples; and the numberof samples on either side of the fiducial point is adjusted to capturethe QRS segment and exclude at least some samples not corresponding tothe desired QRS segment. In yet another embodiment, the operationalcircuitry is configured such that the step of selecting a fiducial pointincludes observing whether a notched QRS complex is likely, and, if so,adjusting the template parameters to assure that a repeatably detectablefiducial point is chosen.

Numerous characteristics and advantages of the invention covered by thisdocument have been set forth in the foregoing description. It will beunderstood, however, that this disclosure is, in many aspects, onlyillustrative. Changes may be made in details, particularly in matters ofshape, size and arrangement of parts without exceeding the scope of theinvention. The invention's scope is defined, of course, in the languagein which the claims are expressed.

1. A method of cardiac signal analysis comprising: sensing a firstcardiac event; configuring template parameters for analysis of the firstcardiac event; defining a first sensed signal for the first cardiacevent using the template parameters; sensing a second cardiac event;defining a second sensed signal for the second cardiac event using thetemplate parameters; comparing the second sensed signal to the firstsensed signal to determine whether the first sensed signal and templateparameters are suitable for defining a cardiac event template; and ifthe first sensed signal and template parameters are suitable, retainingthe first sensed signal and template parameters for using to define acardiac event template; or, if the first sensed signal and templateparameters are not suitable, discarding the first sensed signal andtemplate parameters from use in defining a cardiac event template. 2.The method of claim 1, wherein the step of configuring templateparameters includes selecting a rule for identifying a fiducial point,wherein: the rule is selected from among a set of rules; the rule isselected in light of the characteristics of the first cardiac event; andthe rule for identifying a fiducial point becomes one of the templateparameters.
 3. The method of claim 2, wherein the step of configuringtemplate parameters further includes selecting a number of samples ofthe first sensed signal around the fiducial point; wherein theconfiguration of samples around the fiducial point becomes one of thetemplate parameters.
 4. The method of claim 3, wherein the step ofselecting a number of samples includes identifying the start and end ofa cardiac event.
 5. The method of claim 4, wherein the cardiac event isa QRS complex.
 6. The method of claim 2, wherein the set of rulesincludes an amplitude rule related to the relative amplitudes of peaksin the sensed signal.
 7. The method of claim 6, wherein the set of rulesincludes a location rule related to the location of a peak in the sensedsignal.
 8. The method of claim 2 wherein the set of rules includes alocation rule related to the location of a peak in the sensed signal. 9.The method of claim 2 wherein the set of rules includes a notch rulerelated to identifying a notched cardiac signal, wherein the notch ruleincludes analysis of whether there are multiple peaks within apredefined range of one another in the cardiac signal.
 10. The method ofclaim 9 wherein the notch rule selects the first peak in time if thereare multiple peaks within the predefined range.
 11. The method of claim1, wherein the step of configuring template parameters further includesselecting a number of samples of the first sensed signal around afiducial point in the first sensed signal; wherein the configuration ofsamples around the fiducial point becomes one of the templateparameters.
 12. The method of claim 11, wherein the samples are selectedusing the following steps: first, a number of samples are observed oneither side of the fiducial point; next, it is determined whether adesired QRS segment begins and ends within the number of samples; andthe number of samples on either side of the fiducial point is adjustedto capture the QRS segment and exclude at least some samples notcorresponding to the desired QRS segment.
 13. The method of claim 1,wherein the step of configuring template parameters includes observingwhether a notched QRS complex is likely, and, if so, adjusting thetemplate parameters to assure that a repeatably detectable fiducialpoint is chosen.
 14. A method of cardiac signal analysis comprising:sampling a signal using electrodes implanted in a patient's torso forcapturing cardiac signals; defining a first sensing window around afirst fiducial point to capture a QRS segment; observing the definitionof the first sensing window to create template parameters; defining asecond sensing window around a second fiducial point using the templateparameters; comparing data in the first sensing window to data in thesecond sensing window to verify whether to define a valid template usingthe template parameters; and if the data in the first sensing window isverified, defining a valid template using the template parameter, or, ifthe data in the first sensing window is not verified using differentparameters to define a valid template.
 15. The method of claim 14,wherein the electrodes are subcutaneously implanted in the patient. 16.The method of claim 14, wherein the step of defining a first sensingwindow includes identifying a fiducial point by selecting a rule fromamong a set of rules in light of the characteristics of the QRS segmentin the first sensing window, wherein the rule selected for identifying afiducial point becomes one of the template parameters.
 17. The method ofclaim 16, wherein the step defining a first sensing window around afirst fiducial point includes identifying the start and end of a cardiacevent.
 18. The method of claim 17, wherein the cardiac event is a QRScomplex.
 19. The method of claim 16, wherein the set of rules includes:an amplitude rule related to the relative amplitudes of peaks in thesampled signal; and a location rule related to the location of a peak inthe sampled signal.
 20. The method of claim 14, wherein the step ofdefining a first sensing window includes selecting a number of samplesaround a fiducial point, wherein the configuration of samples around thefiducial point becomes one of the template parameters.
 21. The method ofclaim 20, wherein the samples are selected using the following steps: afiducial point is selected; then a number of samples are observed oneither side of the fiducial point; then it is determined whether adesired QRS segment begins and ends within the number of samples; andthe number of samples on either side of the fiducial point is adjustedto capture the QRS segment and exclude at least some samples notcorresponding to the desired QRS segment.
 22. The method of claim 14,wherein the step of defining a first sensing window includes observingwhether a notched QRS complex is likely, and, if so, adjusting thetemplate parameters to assure that a repeatably detectable fiducialpoint is chosen.
 23. A method of cardiac signal analysis includingforming a template for cardiac event comparisons, the step of forming atemplate comprising: sensing a first cardiac event; identifying a firstfiducial point in the first cardiac event using a set of rules; sensinga second cardiac event; identifying a second fiducial point in thesecond cardiac event using the set of rules; determining whether thefirst fiducial point and second fiducial point were identified using thesame rule; and, if so, retaining the first cardiac event for formingatemplate, or, if not, discarding the first cardiac event.
 24. A methodof cardiac signal template formation comprising: receiving a firstcardiac signal from implanted electrodes; selecting a fiducial point inthe first cardiac signal; forming a template around the fiducial point;attempting to verify the template by receiving additional cardiacsignals and using the template to compare the additional cardiac signalsto the first cardiac signal wherein the template is verified if theadditional cardiac signals and the first cardiac signal, when compared,are found to be similar, and the template is not verified if theadditional cardiac signals and the first cardiac signal, when compared,are found to be dissimilar; and, if the template is verified, retainingthe template for use in cardiac signal analysis or, if the template isnot verified, rejecting the template for use in cardiac signal analysis.25. The method of claim 24, wherein the step of selecting a fiducialpoint includes identifying a fiducial point by selecting a rule fromamong a set of rules in light of the characteristics of first cardiacsignal, wherein the rule selected for identifying a fiducial pointbecomes one of the template parameters.
 26. The method of claim 25,wherein the step forming a template around the fiducial point includesidentifying the start and end of a cardiac event.
 27. The method ofclaim 26, wherein the cardiac event is a QRS complex.
 28. The method ofclaim 25, wherein the set of rules includes an amplitude rule related tothe relative amplitudes of peaks in the cardiac signal.
 29. The methodof claim 28, wherein the set of rules further includes a location rulerelated to the location of a peak in the cardiac signal.
 30. The methodof claim 25, wherein the set of rules includes a location rule relatedto the location of a peak in the cardiac signal.
 31. The method of claim24, wherein the step of forming a template includes selecting a numberof samples around the fiducial point, wherein the configuration ofsamples around the fiducial point becomes one of the templateparameters.
 32. The method of claim 31, wherein the samples are selectedusing the following steps: a number of samples are observed on eitherside of the fiducial point; it is determined whether a desired QRSsegment begins and ends within the number of samples; and the number ofsamples on either side of the fiducial point is adjusted to capture theQRS segment and exclude at least some samples not corresponding to thedesired QRS segment.
 33. The method of claim 24, wherein the step ofselecting a fiducial point includes observing whether a notched QRScomplex is likely, and, if so, adjusting the template parameters toassure that a repeatably detectable fiducial point is chosen.
 34. Animplantable cardioverter/defibrillator comprising: a lead electrodeassembly including a number of electrodes; and a canister housingoperational circuitry; wherein: the lead electrode assembly is coupledto the canister; and the operational circuitry is configured to performsteps of discriminating between cardiac rhythms of a patient's heartwhich are appropriate for therapy, the steps including: sensing a firstcardiac event; configuring template parameters for analysis of the firstcardiac event; defining a first sensed signal for the first cardiacevent using the template parameters; sensing a second cardiac event;defining a second sensed signal for the second cardiac event using thetemplate parameters; comparing the second sensed signal to the firstsensed signal to determine whether the first sensed signal and templateparameters are suitable for defining a cardiac event template; and ifthe first sensed signal and template parameters are suitable, retainingthe first sensed signal and template parameters for further analysis;or, if the first sensed signal and template parameters are not suitable,discarding the first sensed signal and template parameters from use indefining a cardiac event template.
 35. The implantablecardioverter/defibrillator of claim 34, wherein the operationalcircuitry is configured such that the step of configuring templateparameters includes selecting a rule for identifying a fiducial point,and: the rule is selected from among a set of rules; the rule isselected in light of the characteristics of the first cardiac event; andthe rule for identifying a fiducial point becomes one of the templateparameters.
 36. The implantable cardioverter/defibrillator of claim 35,wherein the operational circuitry is configured such that the step ofconfiguring template parameters further includes selecting a number ofsamples of the first sensed signal around the fiducial point, and theconfiguration of samples around the fiducial point becomes one of thetemplate parameters.
 37. The implantable cardioverter/defibrillator ofclaim 36, wherein the operational circuitry is configured such that thestep of selecting a number of samples includes identifying the start andend of a cardiac event.
 38. The implantable cardioverter/defibrillatorof claim 37, wherein the operational circuitry is configured such thatthe cardiac event is a QRS complex.
 39. The implantablecardioverter/defibrillator of claim 35, wherein the operationalcircuitry is configured such that the set of rules includes an amplituderule related to the relative amplitudes of peaks in the sensed signal.40. The implantable cardioverter/defibrillator of claim 39, wherein theoperational circuitry is configured such that the set of rules includesa location rule related to the location of a peak in the sensed signal.41. The implantable cardioverter/defibrillator of claim 35, wherein theoperational circuitry is configured such that the set of rules includesa location rule related to the location of a peak in the sensed signal.42. The implantable cardioverter/defibrillator of claim 35, wherein theoperational circuitry is configured such that the set of rules includesa notch rule related to identifying a notched cardiac signal, whereinthe notch rule includes analysis of whether there are multiple peakswithin a predefined range of one another in the cardiac signal.
 43. Theimplantable cardioverter/defibrillator of claim 42, wherein theoperational circuitry is configured such that the notch rule selects thefirst peak in time if there are multiple peaks within the predefinedrange.
 44. The implantable cardioverter/defibrillator of claim 34,wherein the operational circuitry is configured such that the step ofconfiguring template parameters further includes selecting a number ofsamples of the first sensed signal around a fiducial point in the firstsensed signal; wherein the configuration of samples around the fiducialpoint becomes one of the template parameters.
 45. The implantablecardioverter/defibrillator of claim 44, wherein the operationalcircuitry is configured such that the samples are selected using thefollowing steps: first, a number of samples are observed on either sideof the fiducial point; next, it is determined whether a desired QRSsegment begins and ends within the number of samples; and the number ofsamples on either side of the fiducial point is adjusted to capture theQRS segment and exclude at least some samples not corresponding to thedesired QRS segment.
 46. The implantable cardioverter/defibrillator ofclaim 34, wherein the operational circuitry is configured such that thestep of configuring template parameters includes observing whether anotched QRS complex is likely, and, if so, adjusting the templateparameters to assure that a repeatably detectable fiducial point ischosen.
 47. The implantable cardioverter/defibrillator of claim 34,wherein the operational circuitry comprises a readable medium includingan instruction set for performing the steps of discriminating.
 48. Animplantable cardioverter/defibrillator comprising: a lead electrodeassembly including a number of electrodes; and a canister housingoperational circuitry; wherein: the lead electrode assembly is coupledto the canister; and the operational circuitry is configured to performsteps of discriminating between cardiac rhythms of a patient's heartwhich are appropriate for therapy, the steps including: sampling asignal using the lead electrode assembly while implanted in a patient'storso in locations chosen for capturing cardiac signals; defining afirst sensing window around a first fiducial point to capture a QRSsegment; observing the definition of the first sensing window to createtemplate parameters; defining a second sensing window around a secondfiducial point using the template parameters; comparing data in thefirst sensing window to data in the second sensing window to verifywhether to define a valid template using the template parameters; and ifthe data in the first sensing window is verified, defining a validtemplate using the template parameter, or, if the data in the firstsensing window is not verified using different parameters to define avalid template.
 49. The implantable cardioverter/defibrillator of claim48, wherein the operational circuitry is configured such that the stepof defining a first sensing window includes identifying a fiducial pointby selecting a rule from among a set of rules in light of thecharacteristics of the QRS segment in the first sensing window, whereinthe rule selected for identifying a fiducial point becomes one of thetemplate parameters.
 50. The implantable cardioverter/defibrillator ofclaim 49, wherein the operational circuitry is configured such that thestep defining a first sensing window around a first fiducial pointincludes identifying the start and end of a cardiac event.
 51. Theimplantable cardioverter/defibrillator of claim 50, wherein theoperational circuitry is configured such that the cardiac event is a QRScomplex.
 52. The implantable cardioverter/defibrillator of claim 49,wherein the operational circuitry is configured such that the set ofrules includes: an amplitude rule related to the relative amplitudes ofpeaks in the sampled signal; and a location rule related to the locationof a peak in the sampled signal.
 53. The implantablecardioverter/defibrillator of claim 48, wherein the operationalcircuitry is configured such that the step of defining a first sensingwindow includes selecting a number of samples around a fiducial point,wherein the configuration of samples around the fiducial point becomesone of the template parameters.
 54. The implantablecardioverter/defibrillator of claim 53, wherein the operationalcircuitry is configured such that the samples are selected using thefollowing steps: a fiducial point is selected; then a number of samplesare observed on either side of the fiducial point; then it is determinedwhether a desired QRS segment begins and ends within the number ofsamples; and the number of samples on either side of the fiducial pointis adjusted to capture the QRS segment and exclude at least some samplesnot corresponding to the desired QRS segment.
 55. The implantablecardioverter/defibrillator of claim 48, wherein the operationalcircuitry is configured such that the step of defining a first sensingwindow includes observing whether a notched QRS complex is likely, and,if so, adjusting the template parameters to assure that a repeatablydetectable fiducial point is chosen.
 56. The implantablecardioverter/defibrillator of claim 48, wherein the operationalcircuitry comprises a readable medium including an instruction set forperforming the steps of discriminating.
 57. An implantablecardioverter/defibrillator comprising: a lead electrode assemblyincluding a number of electrodes; and a canister housing operationalcircuitry; wherein: the lead electrode assembly is coupled to thecanister; and the operational circuitry is configured to perform stepsof discriminating between cardiac rhythms of a patient's heart which areappropriate for therapy, the steps including forming a template using atleast the steps of: sensing a first cardiac event; identifying a firstfiducial point in the first cardiac event using a set of rules; sensinga second cardiac event; identifying a second fiducial point in thesecond cardiac event using the set of rules; determining whether thefirst fiducial point and second fiducial point were identified using thesame rule; and, if so retaing the first cardiac event for forming atemplate; and, if not, discarding the first cardiac event.
 58. Animplantable cardioverter/defibrillator comprising: a lead electrodeassembly including a number of electrodes; and a canister housingoperational circuitry; wherein: the lead electrode assembly is coupledto the canister; and the operational circuitry is configured to performsteps of discriminating between cardiac rhythms of a patient's heartwhich are appropriate for therapy, the steps including forming atemplate using at least the steps of: receiving a first cardiac signalfrom the lead electrode assembly; selecting a fiducial point in thefirst cardiac signal; forming a template around the fiducial point;attempting to verify the template by receiving additional cardiacsignals and using the template to compare the additional cardiac signalsto the first cardiac signal wherein the template is verified if theadditional cardiac signals and the first cardiac signal, when compared,are found to be similar, and the template is not verified if theadditional cardiac signals and the first cardiac signal, when compared,are found to be dissimilar; and, if the template is verified, retainingthe template for use in cardiac signal analysis or, if the template isnot verified, rejecting the template for use in cardiac signal analysis.59. The implantable cardioverter/defibrillator of claim 58, wherein theoperational circuitry is configured such that the step of selecting afiducial point includes identifying a fiducial point by selecting a rulefrom among a set of rules in light of the characteristics of firstcardiac signal, wherein the rule selected for identifying a fiducialpoint becomes one of the template parameters.
 60. The implantablecardioverter/defibrillator of claim 59, wherein the operationalcircuitry is configured such that the step forming a template around thefiducial point includes identifying the start and end of a cardiacevent.
 61. The implantable cardioverter/defibrillator of claim 58,wherein the operational circuitry is configured such that the set ofrules includes an amplitude rule related to the relative amplitudes ofpeaks in the cardiac signal.
 62. The implantablecardioverter/defibrillator of claim 60, wherein the operationalcircuitry is configured such that the set of rules further includes alocation rule related to the location of a peak in the cardiac signal.63. The implantable cardioverter/defibrillator of claim 59, wherein theoperational circuitry is configured such that the set of rules includesa location rule related to the location of a peak in the cardiac signal.64. The implantable cardioverter/defibrillator of claim 58, wherein theoperational circuitry is configured such that the step of forming atemplate includes selecting a number of samples around the fiducialpoint, wherein the configuration of samples around the fiducial pointbecomes one of the template parameters.
 65. The implantablecardioverter/defibrillator of claim 64, wherein the operationalcircuitry is configured such that the samples are selected using thefollowing steps: a number of samples are observed on either side of thefiducial point; it is determined whether a desired QRS segment beginsand ends within the number of samples; and the number of samples oneither side of the fiducial point is adjusted to capture the QRS segmentand exclude at least some samples not corresponding to the desired QRSsegment.
 66. The implantable cardioverter/defibrillator of claim 58,wherein the operational circuitry is configured such that the step ofselecting a fiducial point includes observing whether a notched QRScomplex is likely, and, if so, adjusting the template parameters toassure that a repeatably detectable fiducial point is chosen.
 67. Theimplantable cardioverter/defibrillator of claim 58, wherein theoperational circuitry comprises a readable medium including aninstruction set for performing the steps of discriminating.